<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function addClass(){
            let add = document.querySelector("span");
            add.classList.add("emp","emp2");
        }
        function deleteClass(){
            let del = document.querySelector("span");
            del.classList.remove("emp");
        }
        function judgementClass(){
            let jud = document.querySelector("span");
            let rs = jud.classList.contains("emp");
            console.log(rs);
        }
    </script>
    <style type="text/css">
        .emp{
            background-color: red;
            font-size: 50px;
        }
        .emp2{
            color: blue;
        }
    </style>
</head>
<body>
<div>
    <span>样式测试用例</span>
</div>
<button onclick="addClass()">点击添加Class</button>
<button onclick="deleteClass()">点击删除Class</button>
<button onclick="judgementClass()">点击判断是否包含Class</button>
</body>
</html>